$(document).ready(function(){
	$('#headmenu').load('header_menu.php');
	$('#leftmenu').load('leftmenu.php');
	$('#rightmain').load('welcome.php');
})

function gotourl(url, dispid, otherload){
	$.ajax({
		url:url,
		type:'post',
		dataType:'html',
		success:function(data){
			$('#'+dispid).html(data);
		}
	})
	if(otherload){
		$.getScript('/static/js/editor/htmlbox.colors.js');
		$.getScript('/static/js/editor/htmlbox.styles.js');
		$.getScript('/static/js/editor/htmlbox.syntax.js');
		$.getScript('/static/js/editor/xhtml.js');
		$.getScript('/static/js/editor/htmlbox.min.js');
		$.getScript('/static/js/admin_goods_editor.js');
	}
}

function adduploadpic(){
	$('#uppicform').append('<div><a href="javascript:adduploadpic();">+</a><input type="file" size="45" name="fileToUpload[]" class="input"><a href="javascript:$(this).parent(\'div\').remove();">-</a></div>');
}

function uploadimg(){
	$('#uploadimgform').hide();
	$('#loading').show();
	$('#uploadimgform').submit();
}